<extend name="Public:common"/>
<block name="css">
    <style>
        <link rel="stylesheet" href="__STATIC__/layui/css/layui.css"  media="all">
        .left{width:20%; vertical-align: middle;}
        .right{text-align:left;}
        td{vertical-align: middle;}
        label{margin-left:15px;padding:5px;}
        .table thead>tr>th, .table tbody>tr>th, .table tfoot>tr>th, .table thead>tr>td, .table tbody>tr>td, .table tfoot>tr>td{vertical-align: middle}
    </style>
</block>
<block name="content">
     <div class="container-fluid">
         <div class="tabbable">
             <div class="row" style="padding:10px;">
                <span style="cursor:pointer;margin-right:10px;" class="btn btn-primary pull-right" onclick="choseOk();">已经选好</span>
             </div>
             <div class="tab-content">
                 <table class="table table-striped table-bordered table-hover table-condensed text-center">
                     <tbody>
                         <volist name="list" id="vo">
                             <tr>
                                 <td class="left">
                                     <label for="chk_{$vo.traffic_priceId}">
                                         <b>{$vo.traffic_name}|{$vo.seat_name}:{$vo.routes_name}({$vo.money_type})</b>
                                     </label>
                                     <input type="radio" name="trafficId" data-info="{$vo.supplier_name}-{$vo.traffic_name}|{$vo.seat_name}-{$vo.routes_name}-座位{$vo.seat_num}-成人价:{$vo.adult_actual_cost}-儿童价:{$vo.child_actual_cost}({$vo.money_type})" class="chk" id="chk_{$vo.traffic_priceId}" value="{$vo.traffic_priceId}">
                                 </td>
                                 <td class="right">
                                    <span class="label label-success">供应商:{$vo.supplier_name}</span>
                                     <span class="label label-info">运输方式:{$vo.traffic_name}</span>
                                     <span  class="label label-warning">座位总数:{$vo.seat_num}</span>
                                     <span  class="label label-primary">成人价:{$vo.adult_actual_cost}</span>
                                     <span  class="label label-info"> 儿童价:{$vo.child_actual_cost}</span>
                                 </td>
                             </tr>
                         </volist>
                     </tbody>
                 </table>
             </div>
         </div>
     </div>
</block>
<block name="js">
    <script type="text/javascript" src="__STATIC__/layer/layer.js"></script>
    <script>
        function choseOk(){
           var trafficId= $("input[name='trafficId']:checked").val();
           var info=$("input[name='trafficId']:checked").attr('data-info');
           if(!trafficId){
               layer.msg('请选择交通方式');
               alert('请选择交通方式!');
               return;
           }

            parent.{:I('back')}(trafficId,info);
        }
    </script>
</block>